package com.kcwl.idea.plugins.gateway.config;

import javax.swing.*;

public class KcGatewaySettingsForm {
    private JTextField urlField;
    private JPanel panel;

    public JTextField getUrlField() {
        return urlField;
    }

    public void setUrlField(JTextField urlField) {
        this.urlField = urlField;
    }

    public JPanel getPanel() {
        return panel;
    }


    public KcGatewaySettings get() {
        KcGatewaySettings data = new KcGatewaySettings();
        data.setGatewayUrl(urlField.getText().trim());
        return data;
    }


    public void set(KcGatewaySettings data) {
        urlField.setText(data.getGatewayUrl());
    }


    public void setPanel(JPanel panel) {
        this.panel = panel;
    }
}
